package com.manner.groupon.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 用户表
 *
 * @TableName tb_user
 */
@TableName(value = "tb_user")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User extends Object implements Serializable {
    /**
     * 编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户名
     */
    @TableField(value = "phone")
    private String phone;

    /**
     * 收获地址
     */
    @TableField(value = "address")
    private String address;

    /**
     * 昵称
     */
    @TableField(value = "nick_name")
    private String nickName;

    /**
     * 姓名
     */
    @TableField(value = "name")
    private String name;

    /**
     * 邀请人账号
     */
    @TableField(value = "invite_phone")
    private String invitePhone;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private String createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private String updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public User(String phone, String nickName) {
        this.phone = phone;
        this.nickName = nickName;
    }
}